package com.yb.personelmanagement.domain.System;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
public class Department {

	public Department() {
		super();
	}

	public Department(Long id, Long pId, String code, String name, String areaCode, String remark, Long showIndex) {
		super();
		this.id = id;
		this.pId = pId;
		this.code = code;
		this.name = name;
		this.areaCode = areaCode;
		this.remark = remark;
		this.showIndex = showIndex;
	}

	/**
	 * ID 主键自增
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "id", columnDefinition = "bigint(20)  comment'主键自增'")
	private Long id;

	@Column(name = "pid", columnDefinition = "bigint(20)  comment'父节点id'")
	private Long pId;

	/**
	 * 部门编号
	 */
	@Column(name = "code", columnDefinition = "varchar(100)  comment'部门编号'")
	private String code;

	/**
	 * 部门名称
	 */
	@Column(name = "name", columnDefinition = "varchar(100)  comment'部门名称'")
	private String name;

	/**
	 * 所属区域 0-代表无上级部门
	 */
	@Column(name = "areaCode", columnDefinition = "varchar(100)  comment'上级部门编号,0-代表无上级部门'")
	private String areaCode;
	/**
	 * 部门描述
	 */
	@Column(name = "remark", columnDefinition = "varchar(100)  comment'部门描述'")
	private String remark;
	/**
	 * 排序号
	 */
	@Column(name = "showIndex", columnDefinition = "bigint(20)  comment'排序号'")
	private Long showIndex;

	public String getAreaCode() {
		return areaCode;
	}

	public void setAreaCode(String areaCode) {
		this.areaCode = areaCode;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Long getId() {
		return id;
	}

	public Long getpId() {
		return pId;
	}

	public void setpId(Long pId) {
		this.pId = pId;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getShowIndex() {
		return showIndex;
	}

	public void setShowIndex(Long showIndex) {
		this.showIndex = showIndex;
	}

}
